using System.Collections;
using System.Collections.Generic;
using TlsService;
using UnityEngine;

public class TlsVoiceService
{

    public enum EType
    {
        Single,
        Continue
    }
    
    public SingleRecord single{ get; private set; }
    public ContinueRecord continu { get; private set; }

    public bool bOpen => single.tls.bOpen || continu.tls.bOpen;

    public TlsVoiceService()
    {
        single = new SingleRecord();
        continu = new ContinueRecord();
    }

    public void Open(EType type)
    {
        if (type == EType.Single)
        {
            single.StartRecord();
        }
        else
        {
            continu.StartRecord();
        }
    }

    public void Close(EType type)
    {
        if (type == EType.Single)
        {
            single.StopRecord();
        }
        else
        {
            continu.StopRecord();
        }
    }
    


}
